package com.lrm.blog.service;

import com.lrm.blog.po.Blog;
import com.lrm.blog.vo.BlogQuery;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

public interface BlogService {
    public Blog getAndConvert(Long id);//获取并转换何曾HTML输出到前端

    Blog saveBlog(Blog blog);//新增

    Blog getBlog(Long id);//查询

    List<Blog> listRecommendBlogTop(Integer size);

    Page<Blog> listBlog(Pageable pageable, BlogQuery blog);//分页查询

    Page<Blog> listBlog(Long tagId, Pageable pageable);

    Page<Blog> listBlog(Pageable pageable);

    Page<Blog> listBlog(String query,Pageable pageable);

    Blog updateBlog(Long id, Blog blog);

    void deleteBlog(Long id);

    Map<String,List<Blog>> archiveBlog();

    Long countBlog();
}
